package com.Listener;

import org.springframework.stereotype.Component;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

@Component
public class FirstListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("监听器已经创建");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("监听器已经销毁");
    }
}
